
<?=form_open('people/save_user')?>
<h3>Edit User</h3>
<ul>
<?php foreach ($query->result() as $row) { ?>
<?=form_hidden('user', $row->id)?>
<li><label>Name</label><input type="text" value="<?=$row->fname?>" name="fname" /></li>
<li><label>Email</label><input type="text" value="<?=$row->email?>" name="email" /></li>
<li><label>Admin</label>
	<select name="admin">
	<option value="0" <?php 
	if($row->isadmin != '1') 
	{ 
	echo 'selected="selected"'; 
	} ?>>No</option>
	
	<option value="1" <?php 
	if($row->isadmin == '1') 
	{ 
	echo 'selected="selected"'; 
	} ?>>Yes</option>
	</select></li>
<li><label>New Password</label><input type="password" name="pass" /></li>
<li><label>Password Again</label><input type="password" name="pass2" /></li>
<li><input class="submit" type="submit" value="Edit User" /></li>
<?php } ?>
</ul>
</form>